package com.nb.hdj.moduleClass.loginModule;

import com.alibaba.fastjson.parser.JSONToken;
import com.nb.hdj.baseClass.SeleniumBase;
import com.nb.hdj.baseClass.SeleniumUtil;
import com.nb.hdj.page.LoginPage;
import com.nb.hdj.util.JsonDataSaveUtil;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * @Description: TODO
 * @Author: hedongjia
 * @Date: 2021/11/4 下午2:20
 * @Version: v1.0
 */
public class LoginCheck {
    JsonDataSaveUtil jsonDataSaveUtil=new JsonDataSaveUtil();
    LoginPage loginPage=new LoginPage();
    SeleniumBase seleniumBase = new SeleniumBase();
    SeleniumUtil seleniumUtil=new SeleniumUtil();
    public String LoginIframeCheck(WebDriver driver) {
        String  loginTitleElement= jsonDataSaveUtil.ObjectToString(loginPage.getLoginPageElements().get("loginTitleElement"));
        String elementText = seleniumUtil.getElementText(driver, By.xpath(loginTitleElement));
        return elementText;
    }
}
